<?php
defined ( 'IN_ADMIN' ) or exit ( 'No permission resources.' );
$show_dialog = 1;
include $this->admin_tpl ( 'header', 'admin' );
?>
<form method="post" name="frmlist" action="">
	<div class="table-list">
		<table width="100%" cellspacing="0">
		  	<thead>
				<tr>
					<th align="left" colspan="6">
						用户职位关系管理 
					</th>
				</tr>
				<tr>
					<th width="30" align="center">&nbsp;</th>
					<th align="center">用户ID</th>
					<th align="center">职位名称</th>
					<th align="center">公司名称</th>
					<th align="center">职位用户关系</th>
					<th align="center">管理操作</th>
				</tr>
			</thead>
			<?php
			if (is_array ( $lists ) && count ( $lists ) > 0) {
				foreach ($lists as $item){
			?>
          	<tr>
				<td align="center" width="35"><input type="checkbox" name="id[]"
					value="<?php echo $item['id']?>"></td>
				<td align="center" width="10%"><?php echo $item['user_id']?></a></td>
				<td align="center"><?php echo $item['job_name']?></td>
				<td align="center"><?php echo $item['company_name']?></td>
				<td align="center"><?php echo $relationTypeDesc[$item['relation']];?></td>
				<td align="center" width="10%">
					<a href="/index.php?m=hchhr&c=user2job&a=mydelone&id=<?php echo $item['id'] ?>"
					onclick="return confirm('确认删除记录吗？')">删除</a>
				</td>
			</tr>
			<?php
				}
			}else{
			?>
			<tr>
				<td align="center"colspan="5">没有查询到数据。</td>
			</tr>
			<?php }?>
			<tr>
				<td colspan="10">
					<input type="submit" class="button"	name="submitdel" onClick="doDel()" value="删除" />
				</td>
			</tr>
			</tbody>
		</table>
	</div>
<div id="pages"><?php echo $pages ?></div>
</form>
</body>
<script type="text/javascript">
function doDel(){
	if(confirm('确认删除记录吗？')){
		document.frmlist.action='/index.php?m=hchhr&c=user2job&a=mydel';
		submitchk.submit();
	}
}
function doCheck(){
	if(confirm('确认选择记录全部审核通过吗？')){
		document.frmlist.action='/index.php?m=hchhr&c=user2job&a=mycheck';
		submitchk.submit();
	}
}
</script>
</html>